#pragma once
#include "GraphicalEntity.h"
#include "Collision.h"

//An AABB Collision box hooked to a graphical entity
struct CollisionBox;
class PhysicsBox : public BaseIndexedGraphicalEntity
{
#ifdef _DEBUG
protected:
	BaseIndexedGraphicalEntity *TestBox;
#endif

protected:

public:
	D3DXVECTOR3 Angles;
	D3DXMATRIX RotMat;
	CollisionBox BoundingBox;

	PhysicsBox();
	PhysicsBox(IDirect3DDevice9 *nDevice);
	PhysicsBox(IDirect3DDevice9 *nDevice, D3DXVECTOR3 nPosition, D3DXVECTOR3 nVelocity);

	~PhysicsBox();

	void InitCollisionBox(D3DXVECTOR3 nHalfVector);
	void InitCollisionBox(float nX, float nY, float nZ);

	void SetAngles (D3DXVECTOR3 nAngles);
	D3DXVECTOR3 GetAngles( void );

	CollisionBox GetPhysbox( void );

	D3DXVECTOR3 GetHalfVector( void );
	void SetHalfVector(D3DXVECTOR3 nHalfVector);

	//bool CheckCollision(PhysicsBox *OtherBox);

	virtual void Update( float dt );
	virtual void Render( void );

};

class ObjectOrientedPhysicsBox : public PhysicsBox
{
};

